#ifndef URL_H
#define URL_H

#include <sys/types.h>

/* Function: remove_dot_segments
 * http://www.faqs.org/rfcs/rfc3986.html
 * 5.2.4. Remove Dot Segments
 * Function for interpreting and removing the special "." and ".." complete path
 * segments from a referenced path. This is done after the path is extracted from
 * a reference, whether or not the path was relative, in order to remove any
 * invalid or extraneous dot-segments prior to forming the target URI.
 * Returns:
 *   -2: Forbidden URL.
 *   -1: Wrong URL.
 *    n: URL length.
 */
ssize_t remove_dot_segments (unsigned char *dest, const unsigned char *src, off_t *query, off_t *fragment, size_t *total);

#endif /* URL_H */
